package team.archai.nexus.boot.constant;

/**
 * @program: HttpEnum
 * @description: http状态码和返回消息 枚举类
 * @author: lishibin
 * @create: 8:47 PM
 **/
public enum HttpEnum {
    /**
     *
     */
    SUCCESS(200, "success"),
    ERROR(1001, "Unknown Error"),
    SECURE_FAILED(1002, "Secure Exception"),
    AUTH_FAILED(1003, "Authentication failed"),
    PERMISSION_DENIED(1004, "Permission denied"),
    TOKEN_INVALID(1010, "Token invalid"),
    TOKEN_EXPIRED(1011, "Token Expired"),
    RQ_AC_LIMIT(1012, "request access limit max"),
    USER_AUTH_FAILED(1013, "User auth failed"),
    CLIENT_ERROR_REQUEST(400, "Client Error Request"),
    UNAUTHORIZED(401, "Request Unauthorized"),
    FORBIDDEN(403, "Request Forbidden"),
    NOT_FOUND(404, "Not Found"),
    INTERNAL_SERVER_ERROR(500, "Internal Server Error");

    HttpEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    private final Integer code;

    private final String message;

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
